<table width="100%" cellspacing="0" cellpadding="8" class="newsfeed" id="myTable" border="0"  valign="top">
<thead>
    <tr>
        <th>User</th>
        <th>Project</th>
        <th>Start Date</th>
        <th>End Date</th>
        <th>Endless</th>                
        <th>&nbsp;</th>
        <th>&nbsp;</th>
    </tr>
<form method="post" action="/admin/usertoproject/edit">
<tr>
    <td>
            <select  name="filter_user" >
                <option value="" >Select user</option>
                <?php 
                     foreach ($this->aUser as $oUser)
                     {
                ?>               
                <option value="<?php echo $oUser->id?>" <?php echo $oUser->id == $this->val->id_user ? 'selected="selected"' : ''?>><?php echo $oUser->email; ?></option>
                <?php } ?>
            </select>
    </td>
    
    <td>
            <select  name="filter_project">
                <option value="" >Select project</option>
                <?php 
                     foreach ($this->aProject as $oProject)
                     {
                ?>               
                <option value="<?php echo $oProject->id; ?>"  <?php echo $oProject->id == $this->val->id_project ? 'selected="selected"' : ''; ?>
                start_date="<?php echo $oProject->start_date; ?>" end_date="<?php echo $oProject->end_date; ?>" ><?php echo $oProject->name; ?></option>
                <?php } ?>
            </select>
    </td>
    
    <td>
        <input type="text" name="start_date" id="start_date" value="<?php echo $this->val->start_date; ?>" />
    </td>
     
    <td>
        <input type="text" name="end_date" id="end_date"  value="<?php echo $this->val->end_date; ?>"/>
    </td>
    
    <td>
        <input type="checkbox" name="endless" id="endless" <?php echo 1 == $this->val->endless ? 'checked="checked"' : ''; ?> />
    </td>

    <td>
        <input type="submit" value="Save" />
    </td>
</form>    
</tr>
</thead>
</table>
                <?php
